home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16858 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  712 b 

  1. Path: news.compuserve.com!newsmaster
  2. From: 100660.2242@compuserve.com (Andy Graham)
  3. Newsgroups: comp.lang.c++
  4. Subject: HELP Borland C++ 5.0 pointer problem
  5. Date: Fri, 12 Apr 1996 21:04:49 GMT
  6. Organization: CompuServe Incorporated
  7. Message-ID: <4klke8$7mb@dub-news-svc-2.compuserve.com>
  8. NNTP-Posting-Host: dd26-203.compuserve.com
  9. X-Newsreader: Forte Free Agent 1.0.82
  10.  
  11. Could you please tell me why the function below compiles and operates
  12. correctly under win16 but not win32 ?
  13.  
  14.   char* test_function(char *in_data) {
  15.  
  16.     char buffer[20];
  17.     strcpy(buffer, in_data);   // copy in_data to buffer
  18.     in_data = buffer;   // set pointer to buffer
  19.  
  20.     return(in_data);
  21.  
  22.   }  // end test_function function
  23.  
  24. Regards
  25.  
  26. Andy Graham
  27.  
  28.